/*
    6. Write a program in C to convert a time_t object to calendar time expressed as Coordinated Universal Time. 

    Expected Output :

    The calendar time expressed as Coordinated Universal Time is :
    UTC:   Thu Aug 03 10:53:03 2017
    local: Thu Aug 03 16:23:03 2017
*/

#include <stdio.h>
#include <time.h>

int main(void)
{
    time_t rawt;
    time(&rawt);
    printf("The calendar time expressed as Coordinated Universal Time is :\n");
    printf("UTC: %s\n", asctime(gmtime(&rawt)));
    printf("local: %s\n", asctime(localtime(&rawt)));

    return 0;
}